package com.djzhou.gmms.service.menu.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Service;

import com.djzhou.gmms.model.entity.PageBean;
import com.djzhou.gmms.model.menu.TbMenuAuthority;
import com.djzhou.gmms.model.user.VoResource;
import com.djzhou.gmms.service.base.impl.BaseServiceImpl;
import com.djzhou.gmms.service.menu.MenuAuthorityService;

public class MenuAuthorityServiceImpl  extends BaseServiceImpl implements MenuAuthorityService{

	@Override
	public void add(TbMenuAuthority t) {
		
		
	}

	@Override
	public void delete(Integer id) {
		
		
	}

	@Override
	public TbMenuAuthority queryById(Integer id) {
		
		return null;
	}

	@Override
	public List<TbMenuAuthority> queryList(HashMap<String, Object> hashMap) {
		String hql="from TbMenuAuthority menuAuthority where menuAuthority.deleteFlag=0 order by createTime";
		return menuAuthorityDAO.query(hql);
	}

	@Override
	public PageBean<TbMenuAuthority> queryPageBean(
			HashMap<String, Object> hashMap, int pageSize, int currentPage) {
		
		return null;
	}

	@Override
	public void update(TbMenuAuthority t) {
		
		
	}

	@Override
	public List<TbMenuAuthority> queryList(Integer menuId) {
		String hql="from TbMenuAuthority menuAuthority where menuAuthority.deleteFlag=0 and menuAuthority.menu.menuId=? order by createTime";
		return menuAuthorityDAO.query(hql, menuId);
	}

	@Override
	public List<TbMenuAuthority> queryList() {
		String hql="from TbMenuAuthority menuAuthority where menuAuthority.deleteFlag=0 order by menuAuthority.authority.authorityId";
		return menuAuthorityDAO.query(hql);
	}
	@Override
	public VoResource query4AutoComplete(HashMap<String, Object> hashMap, String sidx,
			String sord, int pageSize, int currentPage) {
		// TODO Auto-generated method stub
		return null;
	}
}
